"""
鼠标的操作
双击
"""


import time

from robot.parsing.lexer.statementlexers import ElseHeaderLexer
from selenium import webdriver
from selenium.webdriver import  ActionChains
from selenium.webdriver.common.by import By
driver=webdriver.Edge()
driver.get("http://localhost:8081/regA.html")
ele=driver.find_element(By.CSS_SELECTOR,"#userA")
ele.send_keys("admin")

# # 1 通过ActionChains类创建鼠标对象
action=ActionChains(driver)
# # 2 执行鼠标操作事件
action.double_click(ele)  #相当于全选 --->ctrl+a
# # 3 调用鼠标执行的方法
action.perform()

# 4 关闭浏览器驱动对象
time.sleep(10)  #代码暂停10s中
driver.quit()




